import layoutHeaderAside from '@/layout/header-aside'

const meta = {
	auth: true
}

export default {
	path: '/system',
	name: 'system',
	meta,
	redirect: {
		name: 'system-user'
	},
	component: layoutHeaderAside,
	children: (pre => [{
			path: 'org',
			name: `${pre}org`,
			component: () => import('@/pages/system/org'),
			meta: { ...meta,
				title: '组织管理'
			}
		},
		{
			path: 'user',
			name: `${pre}user`,
			component: () => import('@/pages/system/user'),
			meta: { ...meta,
				title: '用户管理'
			}
		},
		{
			path: 'role',
			name: `${pre}role`,
			component: () => import('@/pages/system/role'),
			meta: { ...meta,
				title: '角色管理'
			}
		},
		{
			path: 'resource',
			name: `${pre}resource`,
			component: () => import('@/pages/system/resource'),
			meta: { ...meta,
				title: '资源管理'
			}
		}
	])('system-')
}
